<template>
  <div class="detail_area">
    <div class="detail_bigtitle">
        <h1 class="detail_title">{{data.title}}</h1>
        <div class="detail_body">
            <div class="detail_time">{{data.time}}</div>
            <div class="detail_writer">{{data.writer}}</div>
        </div>
    </div>
    <img :src="/pic&video/+data.pic" alt="" v-if="data.type=='new'">
    <div v-html="data.contant" class="detail_contant">
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        data:'',
      }
    },
    mounted () {
      let url='detailarea?id='+this.$route.query.id
      this.axios.get(url).then(res=>{
        console.log(res);
        this.data=res.data.results[0]
      })
    },
  }
</script>

<style scoped>
  .detail_area img{
    width: 100%;
  }
  .detail_area video{
    width: 100%;
  }
  .detail_title{
    font-size: 28px;
  }
  /* 渐变色 */
  .detail_bigtitle{
    padding-bottom: 5px;
  }
  /* 设置时间和作者布局 */
  .detail_body{
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    color:#999;
  
}
  /* 内容样式 */
  .detail_contant{
    margin-top: 15px;
  }
  .detail_contant p{
    text-indent: 2em;
    margin-bottom: 5px;
    line-height: 1.5em;
  }
  .detail_contant .foot{
    text-align:right;
    margin-top: 10px;
  }
</style>